<?php
$this->breadcrumbs=array(
	'Tin tức cập nhật' => array('/Home/news/index'),
	$model->title
);
$this->pageTitle = $model->title;
$this->pageDescription = $model->description;
$this->pageCanonical = array('/Home/news/view', array('slug'=>$model->slug));
$this->pageRobotsFollow = 'follow';

$this->pageFacebook=array(
    'og:title'=>$model->title,
    'og:author'=>SITE_AUTHOR,
    'og:type'=>'article',
    'og:image'=>'news/' . date('Ymd', strtotime($model->posteddate)) . '/' . $model->image,
    'og:url'=>array('/Home/news/view', array('slug'=>$model->slug)),
    'og:description'=>$model->description,
    'og:locale'=>'vi_VN',
);
?>
<article class="event-detail news">
    <div class="row">
        <div class="col-xs-9 col-middle">
            <h1 class="event-title"><?php echo $model->title; ?></h1>
            
            <div class="event-content">
            	<?php echo $model->content; ?>
            </div>
            
            <h3 class="event-share">Bài viết liên quan</h3>
            <div class="event-similar">
            	<ul>
                <?php foreach ($news as $data): ?>
                	<li><?php echo CHtml::link($data->title, array('/Home/news/view', 'slug'=>$data->slug)); ?> <small>(<?php echo date('d-m-Y', strtotime($data->posteddate)); ?>)</small></li>
                <?php endforeach; ?>
                </ul>
            </div>
            
            <h3 class="event-share">Chia sẻ và bình luận</h3>
            <div class="event-social">
                <div class="event-social-item">
                    <div class="fb-like" data-href="<?php echo Yii::app()->createAbsoluteUrl('/Home/news/view',array('slug'=>$model->slug)); ?>" data-width="450" data-layout="button_count" data-show-faces="true" data-send="false"></div>
                </div>
                <div class="event-social-item">
                    <a href="https://twitter.com/NEXTTOPEVENT" class="twitter-follow-button" data-show-count="false" data-lang="en">Follow</a>
                </div>
                <div class="event-social-item">
                    <g:plusone annotation="bubble" size="medium"></g:plusone>
                </div>
                <div class="clear"></div>
            </div>
            <!-- Event Facebook Comment -->
            <div class="fb-comments" data-href="<?php echo Yii::app()->createAbsoluteUrl('/Home/news/view',array('slug'=>$model->slug)); ?>" data-width="788"></div>
        </div>
        <div class="col-xs-3 col-left">
            <!-- Docs Calendar -->
            <aside id="calendar"></aside>
            <!-- Docs Events Popular -->
            <?php $this->widget('EventPopular'); ?>
            <!-- Docs News -->
            <?php $this->widget('NewsPopular'); ?>
            <!-- Docs Activities -->
            <?php $this->widget('Activities'); ?>
        </div>
    </div>
</article>